package com.study.spring4;

import org.springframework.context.annotation.AnnotationConfigApplicationContext;

public class App {

    public static void main(String[] args) {

        AnnotationConfigApplicationContext context=new AnnotationConfigApplicationContext(MyBeanFactoryPostProcess.class,MyConfig.class,User.class,UserController.class,UserService.class,UserDao.class);
        System.out.println(context.getBean(MyBean.class));
        System.out.println(context.getBean(Cat.class));
        System.out.println(context.getBean(User.class));
        System.out.println(context.getBean(UserController.class));
        System.out.println(context.getBean(UserDao.class));
        System.out.println(context.getBean(UserService.class));

        User user=context.getBean(User.class);
            user.showUser();
        context.close();
    }
}
